﻿using System.Configuration;

namespace smp.RabbitMq.Configuration
{
    public class PubllishConnections : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new PublishConnection();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((PublishConnection) element).Key;
        }
    }

    public class RequestConnections : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new RequestConnection();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((RequestConnection)element).Key;
        }
    }
}